<?php
if (!defined('IN_XLP')) {
    exit('Access Denied');
}
$Document = array(
    'pageid' => 'goods-lists', //页面标示
    'pagename' => '预约咨询', //当前页面名称
    'mycss' => array(), //加载的css样式表
    'myjs' => array(), //加载的js脚本
	//'footerjs'=>array('content/highcharts', 'content/exporting',),
	'footerjs'=>array(),
    'head' => true, //加载头部文件
);

include getTpl('header', 'public');
?>
<style>
td{position:relative;}
.tc{text-align:center;}
.tc a{text-decoration:underline;}
td .tc{position:absolute;top:50%;left:50%;margin:-7.5px 0 0 -22.5px;}
</style>
<!--顶部导航 开始-->
<?php include getTpl('top', 'public');?>
<!--顶部导航 结束-->
<!--左侧菜单 开始-->
<?php include getTpl('nav', 'public');?>
<!--左侧菜单 结束-->
<!--主体 开始-->
<!-- content -->
  <section id="content">
     <section class="main padder">
        <div class="clearfix"> 
          <h4><i class="fa fa-table"></i>预约咨询</h4> 
        </div>
        <div class="row">
      
      <!-- table 11 -->
      <div class="col-lg-12"> 
        <section class="panel"> 
          <header class="panel-heading">
          咨询列表
          </header> 
          <div class="panel-body"> 
            <div class="row text-small"> 
              <!-- <div class="panel-body"> 
                <div class="row text-small"> 
                <form action="<?php echo U('goods/index'); ?>" method="get">
                
                 <div class="col-sm-4">
                  <div class="input-group"> 
                   <input type="text" class="input-sm form-control" placeholder="Search" name="keyword" id="keyword" value="<?php echo $keyword; ?>"> 
                   <span class="input-group-btn"> <button class="btn btn-sm btn-white" type="submit">搜索</button> </span> 
                  </div> 
                 </div> 
                 </form>
                </div> 
               </div>  -->
            </div> 
          </div> 
          <div class="table-responsive"> 
            <table class="table table-striped b-t text-small"> 
              <thead> 
                <tr>
                  <th width="20">ID</th> 
                  <th class="tc">产品类型</th> 
                  <th class="tc">预约网点</th> 
                  <th class="tc">预约人信息</th> 
                  <th class="tc">预约时间</th>
                  <th class="tc" width="150">操作</th> 
                </tr> 
              </thead> 
              <tbody>
              <?php foreach ($list as $key => $value) { ?>
                <tr> 
                  <td><?php echo $value['id']; ?></td> 
                  <td><div class="tc" style="color: #4196E1"><?php echo $value['user_id']; ?></div></td>
                  <td align="center"><div><?php echo $value['dot']['title']; if($value['dot']['author']){ echo '<br/><span style="color:#009900">['.$value['dot']['author'].':'.$value['dot']['url'].']</span>'; }?></div></td> 
                  <td align="center"><div><?php echo $value['phone']; ?></div></td>
                  <td align="center"><div><?php echo outTime($value['create_time']); ?></div></td>
                  <td>
                    <div class="tc" style="width:auto">
                      <a style="color:red" href="javascript:;" onclick="goodsDel('<?php echo $value['id']; ?>', this)">删除</a>
                    </div>
                  </td> 
                </tr>
              <?php } ?>
              </tbody> 
            </table> 
          </div> 
          <footer class="panel-footer"> 
            <div class="row"> 
              <div class="col-sm-12 text-right text-center-sm"> 
                <?php echo page($total,$page,'', 20, 'page');?>  
              </div> 
            </div> 
          </footer> 
        </section> 
      </div>
        </div> 
    </section>

  </section> 
  <!--/ content --> 
<!--主体 结束-->
<script>
/**
 * 删除商品
 */
function goodsDel( id , obj){
  if(!confirm('真的要删除吗？')) return false;
  $.get('<?php echo U('goods/ajax');?>',{type:'cdel', id:id},function(result){
    Msg.hide();
    if (result.status==1){
      Msg.ok(result.info);
      var s = $(obj).parent().parent().parent().hide();
    }else{
      Msg.error(result.info);
    }
  },'json');
}
</script>
<?php
include getTpl('footer', 'public');
?>